const storeUser = (state = {user: {name: 'init', gender: 0, age: 999}}, action) => {
    console.log('storeUser action:', action);
    console.log('storeUser state:', state);
    switch (action.type) {
        case 'ADD_USER':
            state.user = action.user;
            return state;

        case 'SET_NAME':
            state.user.name = action.name;
            return state;

        default:
            return state
    }
};

export default storeUser